﻿using UnityEngine;
using System.Collections;

public class BorderDestroy : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	private void OnTriggerExit2D(Collider2D collider)
    {
        if (collider.tag=="bullet")
        {
            PoolManager.Instance.Save(collider.gameObject);
        }
        if (collider.tag == "Enemy")
        {
            Destroy(collider.gameObject);
        }
    }
}
